package day8Exer;

/*
* 内部类
* */
public class Demo6 {
    public static void main(String[] args) {
        //成员内部类创建方式
        Demo6.InnerDemo innerDemo = new Demo6().new InnerDemo();


//        InnerMethodDemo innerMethodDemo = new InnerMethodDemo();
    }


    //将类定义z在类中，为成员内部类
    class InnerDemo{


    }



    public void normalMethod(){

        //局部内部类,当前类的作用域只是在方法中
        class InnerMethodDemo{
            public void test(){}

        }

        InnerMethodDemo innerMethodDemo = new InnerMethodDemo();
        innerMethodDemo.test();
    }


}
